package models;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "t_UnLoadPlace")
public class UnLoadPlace_T_Entity implements Serializable{
    private static final Long serialVersionUID=1L;

    private int fdRowId;
    private String unloadplacecode;
    private String unloadplacename;
    private Timestamp modifieddate;
    private String unloadNickName;
    private Double unloadLat;
    private Double unloadLng;
    private String unloadAddr;
    private String product;
    private Integer fdDeptId;
    private Byte fdUseFlag;
    private BigDecimal fdMileageAllowance;
    private Float fdPlaceArea;
    private String mileageDef;

    @Id
    @Column(name = "fd_RowID", nullable = false)
    public int getFdRowId() {
        return fdRowId;
    }

    public void setFdRowId(int fdRowId) {
        this.fdRowId = fdRowId;
    }

    @Basic
    @Column(name = "UNLOADPLACECODE", nullable = true, length = 50)
    public String getUnloadplacecode() {
        return unloadplacecode;
    }

    public void setUnloadplacecode(String unloadplacecode) {
        this.unloadplacecode = unloadplacecode;
    }

    @Basic
    @Column(name = "UNLOADPLACENAME", nullable = true, length = 100)
    public String getUnloadplacename() {
        return unloadplacename;
    }

    public void setUnloadplacename(String unloadplacename) {
        this.unloadplacename = unloadplacename;
    }

    @Basic
    @Column(name = "MODIFIEDDATE", nullable = true)
    public Timestamp getModifieddate() {
        return modifieddate;
    }

    public void setModifieddate(Timestamp modifieddate) {
        this.modifieddate = modifieddate;
    }

    @Basic
    @Column(name = "UnloadNickName", nullable = true, length = 100)
    public String getUnloadNickName() {
        return unloadNickName;
    }

    public void setUnloadNickName(String unloadNickName) {
        this.unloadNickName = unloadNickName;
    }

    @Basic
    @Column(name = "UnloadLat", nullable = true, precision = 0)
    public Double getUnloadLat() {
        return unloadLat;
    }

    public void setUnloadLat(Double unloadLat) {
        this.unloadLat = unloadLat;
    }

    @Basic
    @Column(name = "UnloadLng", nullable = true, precision = 0)
    public Double getUnloadLng() {
        return unloadLng;
    }

    public void setUnloadLng(Double unloadLng) {
        this.unloadLng = unloadLng;
    }

    @Basic
    @Column(name = "UnloadAddr", nullable = true, length = 255)
    public String getUnloadAddr() {
        return unloadAddr;
    }

    public void setUnloadAddr(String unloadAddr) {
        this.unloadAddr = unloadAddr;
    }

    @Basic
    @Column(name = "Product", nullable = true, length = 50)
    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    @Basic
    @Column(name = "fd_DeptID", nullable = true)
    public Integer getFdDeptId() {
        return fdDeptId;
    }

    public void setFdDeptId(Integer fdDeptId) {
        this.fdDeptId = fdDeptId;
    }

    @Basic
    @Column(name = "fd_UseFlag", nullable = true)
    public Byte getFdUseFlag() {
        return fdUseFlag;
    }

    public void setFdUseFlag(Byte fdUseFlag) {
        this.fdUseFlag = fdUseFlag;
    }

    @Basic
    @Column(name = "fd_MileageAllowance", nullable = true, precision = 2)
    public BigDecimal getFdMileageAllowance() {
        return fdMileageAllowance;
    }

    public void setFdMileageAllowance(BigDecimal fdMileageAllowance) {
        this.fdMileageAllowance = fdMileageAllowance;
    }

    @Basic
    @Column(name = "fd_PlaceArea", nullable = true, precision = 0)
    public Float getFdPlaceArea() {
        return fdPlaceArea;
    }

    public void setFdPlaceArea(Float fdPlaceArea) {
        this.fdPlaceArea = fdPlaceArea;
    }

    @Basic
    @Column(name = "MileageDef")
    public String getMileageDef() {
        return mileageDef;
    }

    public void setMileageDef(String mileageDef) {
        this.mileageDef = mileageDef;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UnLoadPlace_T_Entity that = (UnLoadPlace_T_Entity) o;
        return fdRowId == that.fdRowId &&
                Objects.equals(unloadplacecode, that.unloadplacecode) &&
                Objects.equals(unloadplacename, that.unloadplacename) &&
                Objects.equals(modifieddate, that.modifieddate) &&
                Objects.equals(unloadNickName, that.unloadNickName) &&
                Objects.equals(unloadLat, that.unloadLat) &&
                Objects.equals(unloadLng, that.unloadLng) &&
                Objects.equals(unloadAddr, that.unloadAddr) &&
                Objects.equals(product, that.product) &&
                Objects.equals(fdDeptId, that.fdDeptId) &&
                Objects.equals(fdUseFlag, that.fdUseFlag) &&
                Objects.equals(fdMileageAllowance, that.fdMileageAllowance) &&
                Objects.equals(fdPlaceArea, that.fdPlaceArea);
    }

    @Override
    public int hashCode() {

        return Objects.hash(fdRowId, unloadplacecode, unloadplacename, modifieddate, unloadNickName, unloadLat, unloadLng, unloadAddr, product, fdDeptId, fdUseFlag, fdMileageAllowance, fdPlaceArea);
    }
}
